# 100元钱，买100只鸡。公鸡5元一个，母鸡3元一个，小鸡1元3个。
# 	公鸡：0-20
# 		i
# 	母鸡：0-33
# 		j
# 	小鸡：0-300
# 		k=100-i-j

# 一百只

# 5* i + 3* j + (100-i-j)//3 == 100
#
# i = 0
# j = 0
# while i < 21:
#     while j < 33:
#         if 5 * i + 3 * j + (100 - i - j) / 3 == 100:
#             print('公鸡买了 %s 只' % i)
#             print('母鸡买了 %s 只' % j)
#             print('小鸡买了 %s 只' % (100 - i - j))
#             print()
#         j += 1
#     i += 1
#     j = 0

# i = 0
# j = 0
# for i in range(20):
#     for j in range(33):
#         if 5 * i + 3 * j + (100 - i - j) / 3 == 100:
#             print('公鸡买了 %s 只' % i)
#             print('母鸡买了 %s 只' % j)
#             print('小鸡买了 %s 只' % (100 - i - j))
#             print()

# i = 0
# j = 0
# k = 0
# while i < 21:
#     while j < 33:
#         while k < 300:
#             if 5 * i + 3 * j +k / 3 == 100 and i+ j + k == 100:
#                 print('公鸡买了 %s 只' % i)
#                 print('母鸡买了 %s 只' % j)
#                 print('小鸡买了 %s 只' % k)
#                 print()
#             k += 1
#         j += 1
#         k = 0
#     i += 1
#     j = 0

i = 0
j = 0
for i in range(20):
    for j in range(33):
        if 5 * i + 3 * j + (100 - i - j) / 3 == 100:
            print('公鸡买了 %s 只' % i)
            print('母鸡买了 %s 只' % j)
            print('小鸡买了 %s 只' % (100 - i - j))
            print()

